Generally, the industry of semiconductor manufacturing involves highly complex techniques for fabricating integrating circuits using semiconductor materials that are layered and patterned onto a substrate, such as silicon. An integrated circuit is typically fabricated from a plurality of reticles. Generation of reticles and subsequent optical inspection of such reticles have become standard steps in the production of semiconductors. The fabrication of semiconductor devices, such as logic and memory devices, typically includes processing a semiconductor wafer using a large number of semiconductor fabrication processes with multiple reticles to form various features and multiple levels of the semiconductor devices. Multiple semiconductor devices may be fabricated in an arrangement on a single semiconductor wafer and then separated into individual semiconductor devices.
If there are defects on the reticle or wafer, the resulting semiconductor devices may not function properly. In a die-to-die inspection, images of a test die are compared to images of a reference die, and the differences are analyzed to detect defects. Conventionally, an optimal focus is found for a single target of the wafer, and then such optimal focus is used throughout the wafer. However, the optimal focus of the test and reference dies may vary for different wafer positions due to a number of factors so that different positions on the wafer are not inspected at an optimal focus setting. A die-to-die inspection may thereby collect images across the wafer that are not at optimal focus, which causes noise to be introduced into the inspection results so that defects are more difficult to detect.